package com.yeswater.mianshiyang.esdao;

import com.yeswater.mianshiyang.model.dto.post.PostEsDTO;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * 帖子 ES 操作
 *
 */
public interface PostEsDao extends ElasticsearchRepository<PostEsDTO, Long> {

    /**
     * 根据方法名自动映射
     * <a href="https://www.spring-doc.cn/spring-data-elasticsearch/5.4.0/elasticsearch_repositories_elasticsearch-repository-queries.en.html" />
     */
    List<PostEsDTO> findByUserId(Long userId);
}